package com.yc.Di.bean1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author zwei
 * @create 2024-07-29 10:59
 */
@Configuration
@ComponentScan
@PropertySource(value = {"classpath:product.properties"})
public class App1 {
    public static void main(String[] args) {
        ApplicationContext ac=new AnnotationConfigApplicationContext(App1.class);
        Product p=ac.getBean(Product.class);
        System.out.println(p);
    }
}
